﻿@using Smartstore.Web.Models.Search;

@model SearchBoxModel

<form action="@Model.SearchUrl" class="instasearch-form has-icon" method="get">
    <input type="text"
           class="instasearch-term form-control"
            name="q"
            value="@Model.CurrentQuery"
            placeholder="@Model.InputPlaceholder"
            data-instasearch="@(Model.InstantSearchEnabled ? "true" : "false")"
            data-minlength="@(Model.SearchTermMinimumLength.ToString())"
            data-showthumbs="@(Model.ShowThumbsInInstantSearch.ToString().ToLower())"
            data-url="@Model.InstantSearchUrl"
            data-origin="@Model.Origin"
            attr-autocomplete='(Model.InstantSearchEnabled, "off")' />
    
    <div class="instasearch-addon d-flex align-items-center justify-content-center">
        <button type="button" class="instasearch-clear input-clear">
            <i class="fa fa-xmark"></i>
        </button>
    </div>

    <span class="input-group-icon instasearch-icon">
        <i class="fa fa-magnifying-glass"></i>
    </span>

    <div class="instasearch-drop">
        <div class="instasearch-drop-body clearfix"></div>
    </div>

    <zone name="searchbox_addon"></zone>
</form>